/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package exatrez.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Mansur
 */
@Entity
@Table(name = "sv_header")
@NamedQueries({
    @NamedQuery(name = "ShipVisitHeader.findAll", query = "SELECT v FROM ShipVisitHeader v")})
public class ShipVisitHeader implements Serializable{
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "sv_header_id")
    private String svHeaderId;
    @Column(name = "description")
    private String description;
    
    @Embedded
    private InfoAudit infoAudit;
    
    public ShipVisitHeader(){
        
    }

    public String getSvHeaderId() {
        return svHeaderId;
    }

    public void setSvHeaderId(String svHeaderId) {
        this.svHeaderId = svHeaderId;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public InfoAudit getInfoAudit() {
        return infoAudit;
    }

    public void setInfoAudit(InfoAudit infoAudit) {
        this.infoAudit = infoAudit;
    }
    
    @Override
    public int hashCode() {
        int hash = 0;
        hash += (svHeaderId != null ? svHeaderId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ShipVisitHeader)) {
            return false;
        }
        ShipVisitHeader other = (ShipVisitHeader) object;
        if ((this.svHeaderId == null && other.svHeaderId != null) || (this.svHeaderId != null && !this.svHeaderId.equals(other.svHeaderId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "exatrez.model.ShipVisitHeader[ svHeaderId=" + svHeaderId + " ]";
    }
}
